﻿@model DemoProject.Models.EmployeModel

@{
    ViewBag.Title = "Chỉnh sửa ";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Chỉnh sửa @Html.LabelForModel()</h2>


@using (Html.BeginForm())
{
    <div class="form-horizontal">
        <h4>@Html.LabelForModel()</h4>
        <hr />
        @Html.ValidationSummary(true, "", new {@class = "text-danger"})
        @Html.HiddenFor(model => model.EmployeeID)

        <div class="form-group">
            @Html.LabelFor(model => model.LastName, new {@class = "control-label col-md-2"})
            <div class="col-md-10">
                @Html.EditorFor(model => model.LastName, new {htmlAttributes = new {@class = "form-control"}})
                @Html.ValidationMessageFor(model => model.LastName, "", new {@class = "text-danger"})
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.FirstName, new {@class = "control-label col-md-2"})
            <div class="col-md-10">
                @Html.EditorFor(model => model.FirstName, new {htmlAttributes = new {@class = "form-control"}})
                @Html.ValidationMessageFor(model => model.FirstName, "", new {@class = "text-danger"})
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Title, new {@class = "control-label col-md-2"})
            <div class="col-md-10">
                @Html.EditorFor(model => model.Title, new {htmlAttributes = new {@class = "form-control"}})
                @Html.ValidationMessageFor(model => model.Title, "", new {@class = "text-danger"})
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.TitleOfCourtesy, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.TitleOfCourtesy, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.TitleOfCourtesy, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.BirthDate, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.BirthDate, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.BirthDate, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.HireDate, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.HireDate, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.HireDate, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Address, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Address, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Address, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.City, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.City, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.City, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Region, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Region, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Region, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.PostalCode, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.PostalCode, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.PostalCode, "", new { @class = "text-danger" })
            </div>
        </div>
        
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Lưu" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Trở về trang chủ", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
